<template>
  <page-header-wrapper>
    <a-card :bordered="false">
      <a-descriptions title="充值活动详细信息">
        <a-descriptions-item label="活动编号">{{ rechargeActivity.id }}</a-descriptions-item>
        <a-descriptions-item label="活动创建人编号">{{ rechargeActivity.creatorId }}</a-descriptions-item>
        <a-descriptions-item label="活动创建人用户名">{{ rechargeActivity.param.creatorUsername }}</a-descriptions-item>
        <a-descriptions-item label="充值金额">{{ rechargeActivity.rechargeAmount }}</a-descriptions-item>
        <a-descriptions-item label="赠送积分">{{ rechargeActivity.giftPoints }}</a-descriptions-item>
        <a-descriptions-item label="活动开始时间">{{ rechargeActivity.startTime }}</a-descriptions-item>
        <a-descriptions-item label="活动结束时间">{{ rechargeActivity.endTime }}</a-descriptions-item>
        <a-descriptions-item label="活动状态">{{ rechargeActivity.param.stringStatus }}</a-descriptions-item>
        <a-descriptions-item label="记录创建时间">{{ rechargeActivity.createTime }}</a-descriptions-item>
        <a-descriptions-item label="记录更新时间">{{ rechargeActivity.updateTime }}</a-descriptions-item>
      </a-descriptions>
      <a-divider style="margin-bottom: 32px" />
    </a-card>
  </page-header-wrapper>
</template>

<script>
import { STable } from '@/components'
import activityApi from '@/api/activity'

export default {
  components: {
    STable
  },
  data () {
    return {
      id: null,
      rechargeActivity: {}
    }
  },
  created () {
    this.id = this.$route.params.id
    this.init()
  },
  methods: {
    init () {
      activityApi.showRechargeActivity(this.id).then(res => {
        this.rechargeActivity = res.data
      })
    }
  },
  computed: {
    title () {
      return this.$route.meta.title
    }
  }

}
</script>

<style lang="less" scoped>
.title {
  color: rgba(0, 0, 0, .85);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
}
</style>
